class CnStrategyModel {
  bool? isSwitchStrongGuide;//导量开关
  bool isMatchCallFree;
  int initTab;
  bool isShowMatchGender;
  // GenderMatchCoinModel genderMatchCoin;
  bool isReviewPkg=false;
  bool isShowLP;
  bool isCallRearCamera;
  int lpDiscount;
  int lpPromotionDiscount;
  List<String> payChannels = [];
  bool isMaskOpen;
  bool isShowBroadcasterRank;
  bool isAutoAccept;
  List<String> broadcasterWallTags = [];
  int tabType;
  bool isOpenFlashChat;
  List<String> videoStreamCategory = [];
  // FlashChatConfigModel flashChatConfig;
  bool isShowMatch;
  bool isNewTppUsable;
  // UserInvitationModel userInvitation;
  List<String> topOfficialUserIds = [];
  String userServiceAccountId;
  List<String> reviewOfficialBlacklistUserIds = [];
  List<String> officialBlacklistUserIds = [];
  List<String> imIncentiveBlacklistUserIds = [];
  List<String> broadcasterFollowOfficialUserIds = [];
  bool isDisplayNotDisturbCall;
  bool isDisplayNotDisturbIm;
  int imSessionBalance;
  bool isShowFlowInfo;
  // List<BroadcasterWallTagListModel> broadcasterWallTagList = [];
  bool isShowDeletedButton;
  String freeUserCallStaySecond = "";
  String freeUserImStaySecond = "";
  String rechargeUserCallStaySecond = "";
  String rechargeUserImStaySecond = "";
  bool isRandomUploadPaidEvents;

  //工厂模型转化
  factory CnStrategyModel.coverFromJson(dynamic strategyData) => CnStrategyModel(
      isSwitchStrongGuide: strategyData['isSwitchStrongGuide'] ?? false,
      isMatchCallFree: strategyData['isMatchCallFree'],
      initTab: strategyData['initTab'],
      isShowMatchGender: strategyData['isShowMatchGender'],
      // genderMatchCoin:
          // GenderMatchCoinModel.coverFromJson(strategyData['genderMatchCoin']),
      isReviewPkg: strategyData['isReviewPkg']??false,
      isShowLP: strategyData['isShowLP'],
      lpDiscount: strategyData['lpDiscount'],
      lpPromotionDiscount: strategyData['lpPromotionDiscount'],
      payChannels: (strategyData['videoStreamCategory'] as List<dynamic>)
          .map((data) => data.toString())
          .toList(),
      isMaskOpen: strategyData['isMaskOpen'],
      isShowBroadcasterRank: strategyData['isShowBroadcasterRank'],
      isAutoAccept: strategyData['isAutoAccept'],
      broadcasterWallTags: (strategyData['broadcasterWallTags'] as List<dynamic>)
          .map((data) => data.toString())
          .toList(),
      tabType: strategyData['tabType'],
      isOpenFlashChat: strategyData['isOpenFlashChat'],
      videoStreamCategory: (strategyData['videoStreamCategory'] as List<dynamic>)
          .map((data) => data.toString())
          .toList(),
      // flashChatConfig:
          // FlashChatConfigModel.coverFromJson(strategyData['flashChatConfig']),
      isShowMatch: strategyData['isShowMatch'],
      isNewTppUsable: strategyData['isNewTppUsable'],
      topOfficialUserIds: (strategyData['topOfficialUserIds'] as List<dynamic>)
          .map((data) => data.toString())
          .toList(),
      userServiceAccountId :  strategyData['userServiceAccountId'],
      reviewOfficialBlacklistUserIds:
          (strategyData['reviewOfficialBlacklistUserIds'] as List<dynamic>)
              .map((data) => data.toString())
              .toList(),
      officialBlacklistUserIds:
          (strategyData['officialBlacklistUserIds'] as List<dynamic>)
              .map((data) => data.toString())
              .toList(),
      imIncentiveBlacklistUserIds:
          (strategyData['imIncentiveBlacklistUserIds'] as List<dynamic>)
              .map((data) => data.toString())
              .toList(),
      broadcasterFollowOfficialUserIds:
          (strategyData['broadcasterFollowOfficialUserIds'] as List<dynamic>)
              .map((data) => data.toString())
              .toList(),
      isDisplayNotDisturbCall: strategyData['isDisplayNotDisturbCall'],
      isDisplayNotDisturbIm: strategyData['isDisplayNotDisturbIm'],
      imSessionBalance: strategyData['imSessionBalance'],
      isShowFlowInfo: strategyData['isShowFlowInfo'],
      // broadcasterWallTagList:
      //     (strategyData['broadcasterWallTagList'] as List<dynamic>)
      //         .map((data) => BroadcasterWallTagListModel.coverFromJson(data))
      //         .toList(),
      isShowDeletedButton: strategyData['isShowDeletedButton'],
      freeUserCallStaySecond: strategyData['freeUserCallStaySecond'],
      freeUserImStaySecond: strategyData['freeUserImStaySecond'],
      rechargeUserCallStaySecond: strategyData['rechargeUserCallStaySecond'],
      rechargeUserImStaySecond: strategyData['rechargeUserImStaySecond'],
      isRandomUploadPaidEvents: strategyData['isRandomUploadPaidEvents'],
      isCallRearCamera: strategyData['isCallRearCamera'] ?? false
      // userInvitation: UserInvitationModel.coverFromJson(strategyData['userInvitation'])
      );

  CnStrategyModel(
      {required this.isSwitchStrongGuide,
      required this.isMatchCallFree,
      required this.initTab,
      required this.broadcasterFollowOfficialUserIds,
      required this.isShowMatchGender,
      // required this.genderMatchCoin,
      required this.isReviewPkg,
      required this.isShowLP,
      required this.lpDiscount,
      required this.lpPromotionDiscount,
      required this.payChannels,
      required this.isMaskOpen,
      required this.isShowBroadcasterRank,
      required this.isAutoAccept,
      required this.broadcasterWallTags,
      required this.tabType,
      required this.isOpenFlashChat,
      required this.videoStreamCategory,
      // required this.flashChatConfig,
      required this.isShowMatch,
      required this.isNewTppUsable,
      // required this.broadcasterWallTagList,
      required this.freeUserCallStaySecond,
      required this.freeUserImStaySecond,
      required this.imIncentiveBlacklistUserIds,
      required this.imSessionBalance,
      required this.isDisplayNotDisturbCall,
      required this.isDisplayNotDisturbIm,
      required this.isRandomUploadPaidEvents,
      required this.isShowDeletedButton,
      required this.isShowFlowInfo,
      required this.officialBlacklistUserIds,
      required this.rechargeUserCallStaySecond,
      required this.rechargeUserImStaySecond,
      required this.reviewOfficialBlacklistUserIds,
      required this.topOfficialUserIds,
      required this.userServiceAccountId,
      required this.isCallRearCamera
      // required this.userInvitation
      });

  @override
  String toString() {
    return 'StrategyModel{isReviewPkg: $isReviewPkg}';
  }
}
